home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 3
/
Cream of the Crop 3.iso
/
clipper
/
ks94an.zip
/
XLOG.HDR
< prev
next >
Wrap
Text File
|
1994-04-25
|
2KB
|
63 lines
/******************************************************************************
The Klipper Library, for CA-Clipper 5.x
Copyright (c), 1994, Wallace Information Systems Engineering
FUNCTION:
_XLog( cWhat, cWhere ) --> nAppendStatus
PARAMETERS:
cWhat : Text String to Log
cWhere : Log File Name (Default = EXEC_LOG.DAT
SHORT:
Log a line of text to a system log file.
DESCRIPTION:
_XLog() accepts a string and logs it to a database. If the specified
database does not exist it is created with the following structure:
LOG_WHAT Char 100
It has only one field as noted above. Each line is date / time stamped as
it comes in and the text is added to that.
The log file does not have to be limited to this structure. You may create
the file before hand and, so long as it at least has a character field (of
any length) named LOG_WHAT, this function will work fine.
NOTE:
This function may be called at ANY time, while ANY other files are open. If
any database files are open when the call is made, the EXEC_LOG.DAT file is
opened in an UNUSED area, the transaction takes place, the file is closed and
the area that was current before the call was made is restored to current
status.
This function is extremely useful for recording program activity and for
recording important events and who performed them (in a network environment).
RETURNS: 0 Error: Undefined Error
-1 Error: Area in Use
1 Error: File Use Error
NOTE: WORK AREA 70 IS RESERVED FOR THIS FUNCTION (for the time being. I'm
due to get around to this function soon, and will be bringing it out of the
Summer '87 dark ages.)
EXAMPLE:
Assume EXEC_LOG.DAT does not exist:
_XLog('User BETTYG Logged On')
Result: The EXEC_LOG.DAT file is created with the default structure
(LOG_WHAT, C, 100), a record is appended and replaced with a date/time
stamp, and the text "User BETTYG Logged On".
******************************************************************************/